<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>测试</title>
</head>
<body>

<script src="hotkeys.min.js"></script>
<script type="text/javascript">
    hotkeys('ctrl+a,ctrl+b,r,f,enter', function(event,handler) {
        switch(handler.key){
            case "ctrl+a":alert('您按下了ctrl+a!');break;
            case "ctrl+b":alert('您按下了ctrl+b!');break;
            case "r":alert('您按下了r!');break;
            case "f":alert('您按下了f!');break;
            case "enter":alert('您按下了enter!');break;
        }
    });
</script>
</body>
</html>